<?=$this->load->view('include_header',null)?>
	<div id="top-panel">
		<div id="panel">
			<ul>
				<li class="current"><a href="<?=site_url('archive/idcard/'.$id)?>" class="report"><?=(empty($id))?"录入新":"编辑"?>客户基本信息</a></li>
				<?php if(!empty($info->id)):?><li><a id="printInfo" class="folder_table">打印本页信息</a></li><?php endif;?>
			</ul>
		</div>
	</div>
	<div id="wrapper">
		<div id="content">
			<div id="box">
<!-- table begin -->
<form method="post" id="form"  enctype="multipart/form-data" action="<?=site_url('schengen/id_update/'.$cateid)?>">

	<h3>印度尼西亚申请表</h3>
    <table width="100%">
    <thead>
        <tr>
          <td colspan="4" align="right"><img src="<?= (@$info->avatar)?@$info->avatar:'images/avatar.gif'?>" width="150" height="150" /></td>
		  <td align="right">
		  上传照片<br />
		  <input type="file" name="userphoto" /><br />
		  (.gif|.jpg|.png文件,最大1M)<br />
		  <?php if (@$info->attachment):?><a href="<?= @$info->attachment?>" target="_blank">点击下载附件</a><?php endif; ?>
		  &nbsp;&nbsp;&nbsp;&nbsp;上传附件<br />
		  <input type="file" name="userfile" /><br />
		  (.pdf|.zip|.rar|.doc,最大2M)		  </td>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <td colspan="5" align="right">			
			<input type="hidden" name="id" value="<?=$id?>" />
			<input id="button1" type="submit" value="提交信息" />
			<input id="button2" type="reset" value="重置" />			</td>
        </tr>
    </tfoot>

    <tbody>
        <tr class="odd">
            <td colspan="5">NAME IN FULL (IN CAPITALS) 申请者姓名(请用大写拼音字母填写)</td>
        </tr>
        <tr class="even">
            <td>Surname 姓</td>
            <td><input type="text" name="surname" value="<?= @$info->surname?>" /></td>
            <td>&nbsp;</td>
            <td>Given names 名</td>
            <td><input type="text" name="firstname" value="<?= @$info->firstname?>" /></td>
        </tr>
        <tr class="odd">
            <td>CHINESE CHARACTER AND<br /> 
              CODE NUMBER<br />
              姓名(用中文填写)及密码</td>
            <td><input type="text" name="name" value="<?= @$info->name?>" /></td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr class="even">
            <td colspan="5">PLACE & DATE OF BIRTH 出生地点及日期</td>
        </tr>
        <tr class="odd">
            <td>Place &amp; Country 何国何地</td>
            <td><input type="text" name="birth_place" value="<?= @$info->birth_place?>" /></td>
			<td>&nbsp;</td>
            <td>Date of birth 出生日期</td>
            <td><select name="birth_d"><?php for($i=1;$i<=31;$i++) echo "<option value='$i'".((@$info->birth_d==$i)?"selected":"").">$i</option>"; ?></select> - 
			<select name="birth_m"><?php for($i=1;$i<=12;$i++) echo "<option value='$i'".((@$info->birth_m==$i)?"selected":"").">$i</option>"; ?></select> - 
			<select name="birth_y"><?php for($i=date("Y");$i>1940;$i--) echo "<option value='$i'".((@$info->birth_y==$i)?"selected":"").">$i</option>"; ?></select>
			<br />
			（Day日-Month月-Year年）</td>
        </tr>
        <tr class="even">
          <td>Sex 性别</td>
		  <td><input type="radio" name="sex" value="1" <?= (@$info->sex==1)?'checked':''?> />
		  Male / 男性 
            <input type="radio" name="sex" value="2" <?= (@$info->sex==2)?'checked':''?> />
            Female / 女性</td>
		  <td>&nbsp;</td>
		  <td></td>
		  <td></td>
        </tr>
        <tr class="odd">
            <td colspan="5">PASSPORT MUST BE VALID FOR AT LEAST ANOTHER 6 MONTHS AFTER DATE VISA ISSUED<br />
              护照在入境签证后须仍有最少六个月之有效期</td>
        </tr>
        <tr class="even">
            <td>NATIONALITY 国籍</td>
            <td colspan="4"><input type="text" name="nationality" value="<?= @$info->nationality?>" /></td>
        </tr>
        <tr class="odd">
            <td>PASSPORT / TRAVEL DOCUMENT <br />
              护照或旅游证件</td>
            <td colspan="4">Type 种类 
              <input type="text" name="travel_document_type" value="<?= @$info->travel_document_type?>" /> 
              &nbsp;&nbsp;Number 号码 
              <input type="text" name="travel_document_num" value="<?= @$info->travel_document_num?>" />
              <br />
              Place of Issue 签发地点
              <input type="text" name="travel_document_issue_place" value="<?= @$info->travel_document_issue_place?>" /> 
&nbsp;&nbsp;Date 日期 
<input type="text" name="travel_document_issue_date" value="<?= @$info->travel_document_issue_date?>" id="travel_document_issue_date" />
<br />
Valid Until 有效期 
<input type="text" name="travel_document_valid_date" value="<?= @$info->travel_document_valid_date?>" id="travel_document_valid_date" /></td>
        </tr>
        <tr class="even">
            <td colspan="5">PROFESSION/OCCUPATION, NAME & ADDRESS OF FIRM OR COMPANY 职业/职位,公司名称及地址<br />
              Profession/occupation 职业/职位 
                <input type="text" name="occupation" value="<?= @$info->occupation?>" />
              <br />
              Name  of firm or company 公司名称 
              <input name="com_name" type="text" value="<?= @$info->com_name?>" style="width:500px"/>
              <br />
              Address  of firm or company 公司地址
              <input name="com_address" type="text" value="<?= @$info->com_address?>" style="width:500px" />
              <br />
              Tel .电话 
              <input type="text" name="com_tel" value="<?= @$info->com_tel?>" /></td>
        </tr>
		        <tr class="odd">
            <td>HOME OR TEMPORARY ADDRESS<br />住宅或暂时地址</td>
            <td colspan="4"><input name="home_address" type="text" value="<?= @$info->home_address?>" style="width:500px" /> 
              &nbsp;&nbsp; <br />
              Tel.电话 
              <input type="text" name="home_tel" value="<?= @$info->home_tel?>" /></td>
        </tr>
        <tr class="even">
            <td>LENGTH OF INTENDED STAY<br />
              停留天数</td>
            <td><input type="text" name="stay_length" value="<?= @$info->stay_length?>" /></td>
            <td>&nbsp;</td>
            <td>PORT OF ENTRY<br />拟由何处入境</td>
            <td><input type="text" name="entry_port" value="<?= @$info->entry_port?>" /></td>
        </tr>		
        <tr class="odd">
             <td>DATE OF ENTRY<br />
              入境日期</td>
             <td><input type="text" name="entry_date" value="<?= @$info->entry_date?>" id="entry_date" /></td>
            <td>&nbsp;</td>
            <td>ITINERARY IN INDONESIA<br />在印尼旅行地点</td>
            <td><input type="text" name="itinerary" value="<?= @$info->itinerary?>" /></td>
        </tr>
        <tr class="even">
            <td colspan="5">FAMILY MEMBERS ACCOMPANYING AND INCLUDED IN PASSPORT OF APPLICANT 在申请者护照内伴随之家属<br />
              Number 号码 
              <input type="text" name="member_id" value="<?= @$info->member_id?>" /> 
              &nbsp;&nbsp;Name in Full 姓名 
              <input type="text" name="member_name" value="<?= @$info->member_name?>" />
&nbsp;&nbsp;<br />
Relationship with Applicant 关系 
<input type="text" name="member_relate" value="<?= @$info->member_relate?>" />

Sex 性别 
<input type="text" name="member_sex" value="<?= @$info->member_sex?>" />
&nbsp;&nbsp;<br />
Place &amp; date of Birth 出生地点及日期 
<input name="member_birth" type="text" value="<?= @$info->member_birth?>"  style="width:300px"/></td>
        </tr>
        <tr class="odd">
            <td>SPONSOR IN INDONESIA <br />
              在印尼之担保人</td>
            <td colspan="4">Name &amp; address reference in Indonesia 印尼担保人或公司的具体名称和地址<br />
              <label>
              <textarea name="sponsor" ><?= @$info->sponsor?></textarea>
              <br />
              Tel.电话 
              <input type="text" name="sponsor_tel" value="<?= @$info->sponsor_tel?>" />
              </label></td>
        </tr>
        <tr class="even">
            <td>PURPOSE OF JOURNEY TO INDONESIA<br />到印尼的目的</td>
            <td colspan="4"><input name="purpose" type="text" value="<?= @$info->purpose?>" style="width:500px"/></td>
        </tr>

        <tr class="odd">
            <td colspan="5">I HEREBY DECLARE THAT:我谨此申明: Beijing,<br />
              1. THE STATEMENTS GIVEN ABOVE ARE TRUE AND CORRECT上述各项均属实情<br />
              2. I REALIZE THAT EVEN THOUGH POSSESING A VALID VISA<br />
              TO INDONESIA, PERMISSION FOR ENTRY REMAINS AT THE<br />
              DISCRETION OF THE IMMIGRATION AUTHORITIES IN INDONESIA我虽然获得印尼入境签证,但登陆或入境之许可权仍由印尼移民局定夺.</td>
        </tr>
        
    </tbody>
	</table>
<!-- table end -->
</form>

			</div>
		</div>
		
		<?=$this->load->view('include_sidebar',array('id'=>$id,'forms'=>$forms))?>
	</div>

<script type="text/javascript">
$().ready(function() {
  $("#form").validate({
    rules: {
		surname:"required",
		firstname:"required",
		name:"required",
		sex:"required",
		birth_place:"required",
		nationality:"required",
		travel_document_num:"required",
		travel_document_issue_place:"required",
		travel_document_issue_date:"required",
		travel_document_valid_date:"required",
		travel_document_type:"required"
    }
  });
  
	$.datepicker.setDefaults(
		{
		dateFormat: 'dd/mm/yy',
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
		}
	);

	$("#entry_date").datepicker();
	$("#travel_document_issue_date").datepicker();
	$("#travel_document_valid_date").datepicker();
	

	$("#printInfo").click(function(o) {
		var prints = [
			{rel_id: <?=$cateid?>, rec_id: <?=$id?>}
		]  ;
		
		var jdata = JSON.stringify(prints);
		//alert(jdata);
		$.post("<?=site_url('proxy/does/'.str_replace('==','',base64_encode('http://'.$_SERVER['SERVER_NAME'].':9090/javaprduct/servlet/test')))?>",{clients:jdata},function(msg){alert(msg)});
	});
	
	$("#printInfo").ajaxError(function(event,request, settings){
		//$(this).append("<li>出错页面:" + settings.url + "</li>");
		alert("无法访问"+ settings.url );
	}); 
 
});
</script>

<?=$this->load->view('include_footer',null)?>